package cn.kgc.tangcco.pojo;

/**
 * @author 李昊哲
 * @Description
 * @create 2020/9/7 下午2:50
 */
public class Emp {
    private String name;
    private Integer age;
    private Integer gender;
    static {
        System.out.println("我是静态代码块");
    }
    {
        System.out.println("我是构造代码块");
    }
    public Emp() {
        System.out.println("我是无参构造方法");
    }
    public Emp(String name, Integer age, Integer gender) {
        System.out.println("我是有参参构造方法");
        this.name = name;
        this.age = age;
        this.gender = gender;
    }
    public static void haha() {
        System.out.println("我是public static修饰的方法");
        System.out.println("仰天长啸");
    }
    public void heihei() {
        System.out.println("我是public修饰的方法");
        System.out.println("嘿嘿嘿");
    }
    private void hehe() {
        System.out.println("我是private修饰的方法");
        System.out.println("粉面含春威不露,丹唇未起笑先闻");
    }
    public Integer sum(Integer a, Integer b) {
        return a + b;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public int getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    @Override
    public String toString() {
        return "Emp{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender=" + gender +
                '}';
    }
}
